package util.init;

import java.util.HashMap;
import java.util.Map;

public class Location {
	
	/*
	 * filter nanjing library regex
	 */
	String njlibRegex = "^172\\.16\\.20[0-8]\\.([2][0-4]\\d|[2][5][0-5]|[01]?\\d?\\d)";
	/*
	 * filter nanjing train station regex
	 */
	
	String stationRegex = "^10\\.([0-9]||[1-5][0-9]||[6][0-3])(\\.([2][0-4]\\d|[2][5][0-5]|[01]?\\d?\\d)){2}$";
	/*
	 * filter shanxilu starbucks coffee regex
	 */
	String starbucksRegex = "^172\\.13(\\.([2][0-4]\\d|[2][5][0-5]|[01]?\\d?\\d)){2}$";
	/*
	 * filter school regex
	 */
	String schoolRegex = "^192\\.168\\.1\\.([2][0-4]\\d|[2][5][0-5]|[01]?\\d?\\d){1}";
	
	Map<String, String> regexMap = new HashMap<String, String>();
	
	
	public Location() {

		regexMap.put("njlib", njlibRegex);
		regexMap.put("station", stationRegex);
		regexMap.put("starbucks", starbucksRegex);
		regexMap.put("school", schoolRegex);
		
	}
	
	public String getLocationRegex(String location) {
	
		return regexMap.get(location);

	}
	
	

}
